package com.jsmile.cloud.tradecenter.api.req;

import java.util.Objects;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 龚亮
 * @version 1.0
 * @desc 为了薪资破万，还是睡一会儿吧...!
 * @date 2019年04月01日 04:45:35
 */
@Data
@ApiModel
@NoArgsConstructor
@AllArgsConstructor
public class SplitOrder {

    private Long shopId;
    @ApiModelProperty(value = "供应商id")
    private Long supplyId;
    @ApiModelProperty(value = "配送方式")
    private Integer deliveryType;

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        SplitOrder that = (SplitOrder)o;
        return shopId.equals(that.shopId) && supplyId.equals(that.supplyId) && deliveryType.equals(that.deliveryType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(shopId, supplyId, deliveryType);
    }
}
